﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class DropDownListBindable_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        System.Diagnostics.Debug.WriteLine(e.Row.RowIndex);
    }

    protected void DropDownList1_DataBound(object sender, EventArgs e)
    {
        /*
        (sender as DropDownList).Items.Insert(0, new ListItem(null, null));
        (sender as DropDownList).Items.Insert(0, new ListItem(string.Empty, string.Empty));
        (sender as DropDownList).Items.Insert(0, new ListItem(null, string.Empty));
        (sender as DropDownList).Items.Insert(0, new ListItem(string.Empty, null));
         */
    }
    protected void DropDownList1_DataBinding(object sender, EventArgs e)
    {
        (sender as DropDownList).Items.Insert(0, new ListItem(null, null));
        (sender as DropDownList).Items.Insert(0, new ListItem(string.Empty, string.Empty));
        (sender as DropDownList).Items.Insert(0, new ListItem(null, string.Empty));
        (sender as DropDownList).Items.Insert(0, new ListItem(string.Empty, null));
    }
    protected void ObjectDataSource2_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        (e.ReturnValue as IDictionary<string, string>).Add(string.Empty, null);
    }
}